let ModulesFile = import.meta.glob('./*.js', {eager:true});

let arr = [];

// 获取值，再用map遍历
Object.values(ModulesFile).map(el => {
    if (el.default) {
        arr.push(...el.default);
    }
});

let business = {
    path: '/list',
    name: 'List',
    children: [
        {path: '', component: () => import('components/shoplist/List.vue')},
        ...arr
    ]
}

export default business;